package com.arron.algorithm.huawei.简单;

import java.util.Scanner;

public class 质数因子 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int a = in.nextInt();
        if(a<2){
            System.out.print(a+" ");
        }
        int k = (int)Math.sqrt(a);
        for(int i = 2; i<= k;i++){
            while(a%i ==0){
                System.out.print(i+" ");
                a=a/i;
            }
        }

        if(a != 1){
            System.out.print(a+" ");
        }
    }

}
